package top.lixunda.ecommerce.server.user.api.entity.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author Xumda
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("binding_type")
public class BindingTypeDO extends Model<BindingTypeDO> {

    private static final long serialVersionUID=1L;

    public static final int BINDING_TYPE_QQ = 1;

    public static final int BINDING_TYPE_WE_CHAT = 2;

    public static final int BINDING_TYPE_ALIPAY = 3;

    public static final int BINDING_TYPE_EMAIL = 4;

    public static final int BINDING_TYPE_PHONE = 5;

    public static final int BINDING_TYPE_ID_CARD = 6;

    /**
     * 主键，自动生成，唯一表示一种登陆方式，如qq登陆，微信登录等等
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 登陆方式名称
     */
    @TableField("name")
    private String name;

    /**
     * 是否是三方账户，手机号，邮箱不属于三方账户
     */
    @TableField("third_account")
    private Integer thirdAccount;

    /**
     * 登陆方式的地址
     */
    @TableField("url")
    private String url;

    /**
     * 备注信息
     */
    @TableField("remark")
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
